//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { MinishopDispatchStore, MinishopDispatchStoreResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooMinishopDispatchStoreList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<MinishopDispatchStoreResponse>(`/uctoo/minishop_dispatch_store/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooMinishopDispatchStore = async (id: string) => {
  return requestClient.get<MinishopDispatchStore>(`/uctoo/minishop_dispatch_store/${id}`);
};

export const adductooMinishopDispatchStore = async (data: Partial<MinishopDispatchStore>) => {
  return requestClient.post<MinishopDispatchStore>('/uctoo/minishop_dispatch_store/add', data);
};

export const edituctooMinishopDispatchStore = async (data: Partial<MinishopDispatchStore>) => {
  return requestClient.post<MinishopDispatchStore>('/uctoo/minishop_dispatch_store/edit', data);
};

export const deleteuctooMinishopDispatchStore = async (id: string) => {
  return requestClient.post<any>('/uctoo/minishop_dispatch_store/del', { id });
};
